home *** CD-ROM | disk | FTP | other *** search
-
- // JavaScript wrapper for r3canvas.h
- // Auto generated file, do not modify by hand
- // Copyright ⌐ 2004, Realsoft Graphics Oy
-
- var R3_CANVAS_H = 1;
- include("oops/r3widget.js")
- include("oops/r3color.js")
-
-
- var R3CLID_CANVAS = 264;
-
-
-
-
- // Description: Ask canvas to create new drawing context. Multiple threads can render to a single
- // window through drawing contexes. Drawing context specifies all rendering attributes, such as current color etc.
- // Virtual method
- // Returns: Object, address of the created drawing context.
-
- R3CM_NEWDRAWCONTEXT = 264000;
-
- function mR3CM_NEWDRAWCONTEXT() {
- return R3ToJS( DoA(this.r3obj, 264000, 0, R3TID_INTEGER, 0));
- }
-
- // Description: Ask canvas to delete given drawing context.
- // Virtual method
- // Returns: Boolean, FALSE if drawing context wasn't created by the canvas
- // p3: Object, drawing context
-
- R3CM_DELETEDRAWCONTEXT = 264001;
-
- function mR3CM_DELETEDRAWCONTEXT(p3) {
- return DoA(this.r3obj, 264001, p3, R3TID_OBJECT, 0);
- }
-
- // Description: Duplicate given draw context
- // Virtual method
- // Returns: Object, newly created draw context
- // p3: Object, draw context to be duplicated
-
- R3CM_COPYDRAWCONTEXT = 264002;
-
- function mR3CM_COPYDRAWCONTEXT(p3) {
- return R3ToJS( DoA(this.r3obj, 264002, p3, R3TID_OBJECT, 0));
- }
-
- // Description: Ask canvas to restore the contents of the damaged window.
- // Virtual method
- // Returns: Boolean, FALSE if failed
-
- R3CM__WAS__RESTOREFROMBACKUP = 264003;
-
- function mR3CM__WAS__RESTOREFROMBACKUP() {
- return DoA(this.r3obj, 264003, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Class method which can be used for registering new canvas classes. The canvas class
- // keeps track of all available canvas classes and ENUMCANVASLIST can be used for learning what
- // classes are available.
- // Returns: Boolean, FALSE if no more canvases cannot be registered
- // p1: String, name of the canvas
- // p2: Integer, class id of the canvas class
- // p3: Tag[], currently unused
-
- R3CCM_REGISTERCANVAS = 264004;
-
- function mR3CCM_REGISTERCANVAS(p1, p2, p3) {
- return Do3(this.r3obj, 264004, p1, R3TID_STRING, 0, p2, R3TID_INTEGER, 0, p3, R3TID_TAG, R3TNF_ARRAY);
- }
-
- // Description: Enumerate available canvas classes. Calls given object with given method as R3SendMsgA3(R3OBJ *userobj, R3INT
- // usermth, char *class_name, R3INT classid, void *user_data);
- // Returns: Integer, return value from the callback object
- // p1: Object, object to be called
- // p2: Integer, method to be called
- // p3: Object, whatever user specific data
-
- R3CCM_ENUMCANVASLIST = 264005;
-
- function mR3CCM_ENUMCANVASLIST(p1, p2, p3) {
- return DoA3(this.r3obj, 264005, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
- }
-
- // Description: window moves on screen
-
- R3CM_SCREENPOSITIONCHANGED = 264006;
-
- function mR3CM_SCREENPOSITIONCHANGED() {
- DoA(this.r3obj, 264006, 0, R3TID_INTEGER, 0);
- }
-
- // Description: window is activated
-
- R3CM_ACTIVATE = 264007;
-
- function mR3CM_ACTIVATE() {
- DoA(this.r3obj, 264007, 0, R3TID_INTEGER, 0);
- }
-
- // Description: Palette of the window has changed
-
- R3CM_PALETTECHANGED = 264008;
-
- function mR3CM_PALETTECHANGED() {
- DoA(this.r3obj, 264008, 0, R3TID_INTEGER, 0);
- }
-
- // Description: get an index for RGB color value.
- // Returns: Integer, index
- // p3: r3Vect4, RGB color
-
- R3CM_GETINDEXFORCOLOR = 264009;
-
- function mR3CM_GETINDEXFORCOLOR(p3) {
- return DoA(this.r3obj, 264009, p3, R3TID_COLOR_RGBA, 0);
- }
-
- // Description: Make the given dc the master dc. One of the * drawports is the master
- // port, which take care * of swapbuffers etc.
- // Returns: Integer, index
-
- R3CM_SETMASTER = 264010;
-
- function mR3CM_SETMASTER() {
- return DoA(this.r3obj, 264010, 0, R3TID_INTEGER, 0);
- }
-
-
-
-
- R3CA_DoubleBuffer = 264500;
- function SetR3CA_DoubleBuffer(value) {
- R3Set(this.r3obj, R3CA_DoubleBuffer, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_Main = 264501;
- function SetR3CA_Main(value) {
- R3Set(this.r3obj, R3CA_Main, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_Overlays = 264502;
- function SetR3CA_Overlays(value) {
- R3Set(this.r3obj, R3CA_Overlays, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_DoubleBufferOverlays = 264503;
- function SetR3CA_DoubleBufferOverlays(value) {
- R3Set(this.r3obj, R3CA_DoubleBufferOverlays, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_BackDrop = 264504;
- function SetR3CA_BackDrop(value) {
- R3Set(this.r3obj, R3CA_BackDrop, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_BackDropImage = 264505;
- function SetR3CA_BackDropImage(value) {
- R3Set(this.r3obj, R3CA_BackDropImage, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_Shaded = 264506;
- function SetR3CA_Shaded(value) {
- R3Set(this.r3obj, R3CA_Shaded, value, R3TID_INTEGER, 0);
- }
-
- function GetR3CA_Shaded() {
- return R3Get(this.r3obj, R3CA_Shaded, R3TID_INTEGER, 0);
- }
-
- R3CA_Backup = 264507;
- function SetR3CA_Backup(value) {
- R3Set(this.r3obj, R3CA_Backup, value, R3TID_BOOLEAN, 0);
- }
-
- R3CA_TrueColor = 264508;
- function SetR3CA_TrueColor(value) {
- R3Set(this.r3obj, R3CA_TrueColor, value, R3TID_BOOLEAN, 0);
- }
-
- function GetR3CA_TrueColor() {
- return R3Get(this.r3obj, R3CA_TrueColor, R3TID_BOOLEAN, 0);
- }
-
- R3CA_Palette = 264509;
- function GetR3CA_Palette() {
- return R3ToJS(R3Get(this.r3obj, R3CA_Palette, R3TID_OBJECT, 0));
- }
-
- R3CA_ClipLeft = 264510;
- function SetR3CA_ClipLeft(value) {
- R3Set(this.r3obj, R3CA_ClipLeft, value, R3TID_INTEGER, 0);
- }
-
- function GetR3CA_ClipLeft() {
- return R3Get(this.r3obj, R3CA_ClipLeft, R3TID_INTEGER, 0);
- }
-
- R3CA_ClipRight = 264511;
- function SetR3CA_ClipRight(value) {
- R3Set(this.r3obj, R3CA_ClipRight, value, R3TID_INTEGER, 0);
- }
-
- function GetR3CA_ClipRight() {
- return R3Get(this.r3obj, R3CA_ClipRight, R3TID_INTEGER, 0);
- }
-
- R3CA_ClipTop = 264512;
- function SetR3CA_ClipTop(value) {
- R3Set(this.r3obj, R3CA_ClipTop, value, R3TID_INTEGER, 0);
- }
-
- function GetR3CA_ClipTop() {
- return R3Get(this.r3obj, R3CA_ClipTop, R3TID_INTEGER, 0);
- }
-
- R3CA_ClipBottom = 264513;
- function SetR3CA_ClipBottom(value) {
- R3Set(this.r3obj, R3CA_ClipBottom, value, R3TID_INTEGER, 0);
- }
-
- function GetR3CA_ClipBottom() {
- return R3Get(this.r3obj, R3CA_ClipBottom, R3TID_INTEGER, 0);
- }
-
- R3CA_DrawContextClass = 264514;
- function SetR3CA_DrawContextClass(value) {
- R3Set(this.r3obj, R3CA_DrawContextClass, value, R3TID_INTEGER, 0);
- }
-
- R3CA_Semaphore = 264515;
- function SetR3CA_Semaphore(value) {
- R3Set(this.r3obj, R3CA_Semaphore, value, R3TID_OBJECT, 0);
- }
-
- R3CA_Depth = 264517;
- function SetR3CA_Depth(value) {
- R3Set(this.r3obj, R3CA_Depth, value, R3TID_INTEGER, 0);
- }
-
- var R3CCA_DefaultBackgroundColorRGB = 264518; // r3Vect4[]
- var R3GM_TRUECOLOR = 0;
- var R3GM_PALETTE = 1;
-
-
- function r3Canvas () {
- this.base = r3God;
- if(arguments.length) {
- this.base(R3CLID_CANVAS, arguments);
- }
- // Methods
- this.NEWDRAWCONTEXT=mR3CM_NEWDRAWCONTEXT;
- this.DELETEDRAWCONTEXT=mR3CM_DELETEDRAWCONTEXT;
- this.COPYDRAWCONTEXT=mR3CM_COPYDRAWCONTEXT;
- this._WAS__RESTOREFROMBACKUP=mR3CM__WAS__RESTOREFROMBACKUP;
- this.REGISTERCANVAS=mR3CCM_REGISTERCANVAS;
- this.ENUMCANVASLIST=mR3CCM_ENUMCANVASLIST;
- this.SCREENPOSITIONCHANGED=mR3CM_SCREENPOSITIONCHANGED;
- this.ACTIVATE=mR3CM_ACTIVATE;
- this.PALETTECHANGED=mR3CM_PALETTECHANGED;
- this.GETINDEXFORCOLOR=mR3CM_GETINDEXFORCOLOR;
- this.SETMASTER=mR3CM_SETMASTER;
-
- // Attributes
- this.SetDoubleBuffer=SetR3CA_DoubleBuffer;
- this.SetMain=SetR3CA_Main;
- this.SetOverlays=SetR3CA_Overlays;
- this.SetDoubleBufferOverlays=SetR3CA_DoubleBufferOverlays;
- this.SetBackDrop=SetR3CA_BackDrop;
- this.SetBackDropImage=SetR3CA_BackDropImage;
- this.GetShaded=GetR3CA_Shaded;
- this.SetShaded=SetR3CA_Shaded;
- this.SetBackup=SetR3CA_Backup;
- this.GetTrueColor=GetR3CA_TrueColor;
- this.SetTrueColor=SetR3CA_TrueColor;
- this.GetPalette=GetR3CA_Palette;
- this.GetClipLeft=GetR3CA_ClipLeft;
- this.SetClipLeft=SetR3CA_ClipLeft;
- this.GetClipRight=GetR3CA_ClipRight;
- this.SetClipRight=SetR3CA_ClipRight;
- this.GetClipTop=GetR3CA_ClipTop;
- this.SetClipTop=SetR3CA_ClipTop;
- this.GetClipBottom=GetR3CA_ClipBottom;
- this.SetClipBottom=SetR3CA_ClipBottom;
- this.SetDrawContextClass=SetR3CA_DrawContextClass;
- this.SetSemaphore=SetR3CA_Semaphore;
- this.SetDepth=SetR3CA_Depth;
- }
-
- r3Canvas.prototype=new r3Widget;
- // r3canvas.h_H